<?php
header("content-type:text/html;charset=utf8");
$id=$_GET['id'];
$dbh  = new  PDO ( 'mysql:host=localhost;dbname=mhsw' , 'root' , 'root' );
$sql="select * from jj where id='$id'";
$arr=$dbh->query($sql)->fetch(PDO::FETCH_ASSOC);
?>
<form action="updatedo.php" method="post">
    <table border="1">
        <tr>
            <td>用户名</td>
            <td><input type="text" name="username" value="<?php echo $arr['username']?>"></td>
        </tr>
        <tr>
            <td>密码</td>
            <td><input type="text" name="userpwd" value="<?php echo $arr['userpwd']?>"></td>
        </tr>
        <tr>
            <td><input type="submit" value="修改"></td>
        </tr>
        <input type="hidden" name="hid" value="<?php echo $id;?>">
    </table>
</form>

